Skip to content

Update Web API Response: status property: add '0' status value #39533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions files/en-us/web/api/response/status/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ For example, `200` for success, `404` if the resource could not be found.
An unsigned short number.
This is one of the [HTTP response status codes](/en-US/docs/Web/HTTP/Reference/Status).

A value is `0` is returned for an [‘opaque’ filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change
A value is `0` is returned for an [opaque filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).
A value is `0` is returned for an ['opaque' filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A value is `0` is returned for an [‘opaque’ filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).
A value is `0` is returned for a response whose {{domxref("Response.type", "type")}} is `opaque`, `opaqueredirect`, or `error`.

(it's better to cross-link to MDN's own documentation for type, which can then explain in one place what the different types mean)


## Examples

In our [Fetch Response example](https://github.com/mdn/dom-examples/tree/main/fetch/fetch-response) (see [Fetch Response live](https://mdn.github.io/dom-examples/fetch/fetch-response/))
Expand Down
Loading